import random

def sortCheck(tolur):
	variab = False
	for x in range(4):
		if tolur.count(x+1) == 0:
			variab = True
	return variab

mengi = []
counter = 0
for y in range(123456):
	mengi[:] = []
	for x in range(13):
		mengi.append(random.randint(1, 4))
	if sortCheck(mengi):
		counter += 1
print(counter/123456)


#finnst talan full lág en þetta skilar lausn.
